<?php

namespace App\Models\Car;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Models\Contract\CarContract;
use Modules\Car\Entities\RecognizeDrivingLicense;

class ExternalTransfer extends Model
{
    use HasFactory;
    protected $guarded=[];
//    protected $fillable = ['common_user','status','is_show','car_id','avatar','openid'];
    protected function serializeDate(\DateTimeInterface $date)
    {
        return $date->format('Y-m-d H:i:s');
    }
    public function contracts()
    {
        return $this->hasMany(CarContract::class,'order_id','ids');
    }
    //排车
    public function gear(){
        return $this->hasOne(RecognizeDrivingLicense::class,'id','gear_car_id');
    }
}
